coming or going, not know if one is
Be in a state of mental confusion, as in
He has so much to do that he doesn't know if he's coming or going
. This idiom was first recorded in 1924.